package com.cykj.mapper;

import com.cykj.pojo.CyPatient;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface PatientMapper {
    List<CyPatient> getAllPatient();
    int deletePatient(int patientId);
    int selectIsAlter(@Param("patientId") int patientId,
                      @Param("patientMoney") double patientMoney,
                      @Param("patientHeight") int patientHeight,
                      @Param("patientWeight") int patientWeight);
    int alterInfo(@Param("patientId") int patientId,
                  @Param("patientMoney") double patientMoney,
                  @Param("patientHeight") int patientHeight,
                  @Param("patientWeight") int patientWeight);
    List<CyPatient> selectByData(@Param("sort") int sort, @Param("value") String value);
    //通过id批量删除
    int deleteUserByIds(@Param("ids") List<Integer> ids);
    int addCommit(@Param("name") String name,
                  @Param("age") int age,
                  @Param("phone") String phone,
                  @Param("cardID") String cardID,
                  @Param("height") int height,
                  @Param("weight") int weight,
                  @Param("radio") String radio,
                  @Param("money") int money);

    int selectAddIsExist(@Param("name") String name, @Param("cardID") String cardID);
    //int selectCount();

    //年龄范围
    int selectAgeCount(@Param("age1") int age1, @Param("age2") int age2);
    String selectMoneyCount(@Param("age1") int age1,
                         @Param("age2") int age2,
                         @Param("time1") String time1,
                         @Param("time2") String time2);
}
